import request from '@/utils/request'

//查询轮播图  listFarmSeed
export function headList(params) {
  return request({
    url: '/operate/confRotation/listPage',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'pageNum': params.pageNum,
      'pageSize': params.pageSize
    },
    method: 'get',
    params:params
  })
}

// 添加轮播图 addFarmSeed
export function addHead(data) {
  return request({
    url: '/operate/confRotation',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}

// 修改轮播图
export function updateHead(data) {
  return request({
    url: '/operate/confRotation',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'put',
    data
  })
}

// 删除轮播图
export function deleteHead(data) {
  return request({
    url: '/operate/confRotation/'+data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'delete',
  })
}

// 查询字典
export function getInLinkList(params) {
  return request({
    url: '/operate/confDict/list',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'get',
    params:params
  })
}


//查询楼层list  listFloor
export function listFloor(params) {
  return request({
    url: '/operate/appFloor/listFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'pageNum': params.pageNum,
      'pageSize': params.pageSize
    },
    method: 'get',
    params:params
  })
}

// 添加楼层 addFloor
export function addFloor(data) {
  return request({
    url: '/operate/appFloor/addFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}

// 修改楼层
export function updateFloor(data) {
  return request({
    url: '/operate/appFloor/updateFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}

// 获取楼层下的数据
export function getFloorData(params) {
  return request({
    url: '/operate/appFloor/getFloorData2',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'get',
    params:params
  })
}

// 添加楼层下的数据
export function addFloorData(data) {
  return request({
    url: '/operate/appFloor/addFloorData',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}
